Skip to content

Honor explicit IP family requests in NetworkManager profiles - #2

Closed
pjeweb wants to merge 2 commits into
mainfrom
osb/pr/opt-in-ip-family
Closed

pjeweb wants to merge 2 commits into
mainfrom
osb/pr/opt-in-ip-family

Conversation

@pjeweb

@pjeweb pjeweb commented Nov 14, 2026 •

Copy link
Copy Markdown

What

An IP family in a cellular policy now reaches the saved NetworkManager profile. This lets a caller request IPv6-only service instead of having that request silently ignored.

  • ipv4, ipv6, and ipv4v6 select the saved profile's IP methods.
  • Known readback mismatches stay pending; missing family readback causes no repeated update.
  • The required 1.x policy field and its ipv4v6 default remain compatible. Low-level profile calls can still omit the family to leave methods alone.

Why

The policy already carries an IP family, but the writer has ignored it. Honoring it is a first step toward IPv6-only carriers; end-to-end support still needs IPv6-aware consumers and CLAT for IPv4 hotspot clients. CeraUI currently forces IPv4 with ipv6.method ignore, and those profiles read back here as unknown.

The existing NetworkManager port writes both methods together and reads saved settings back. Saving a profile does not reconnect an active modem.

For an ipv4 request, should ipv6.method use ignore to match CeraUI, or keep disabled to turn IPv6 off on the interface?

How to verify

Commands and validation
  • bun test --max-concurrency 1 control/src/backend/nm-ip-family.test.ts cli/src/policy-family.test.ts: 14 pass, 0 fail. Covers create/update mappings, unchanged low-level argv on omission, unknown readback without drift, known mismatch convergence, and saved settings changed independently of the request. The fake has its own writer and readback parser.
  • dbus-run-session -- bun test --max-concurrency 1: 1,506 pass, 0 fail, including FM350 coverage.
  • bun run lint and bun run typecheck: pass.
  • bun run --cwd control verify:tarball: pass, 412 entries.
  • bun run --cwd control verify:consumers: pass with Node 26.

Tests ran with Bun 1.4.3. No live modem or SIM test is claimed.

Review follow-up

Missing appliedIpFamily is now unknown rather than drift. The required policy field and dual-stack default are retained for 1.x readers. Saved-method readback is checked against independently changed settings, the fake no longer imports the production profile builder or patch mapper, and the field-count comments distinguish base fields from optional IP methods.

Risks

Behavior changes and limits
Request ipv4.method ipv6.method
ipv4 auto disabled
ipv6 disabled auto
ipv4v6 auto auto
  • Existing policies now have their family honored on profile creation and on updates needed for APN, roaming, or a known family mismatch. The default remains ipv4v6; CLI JSON omission converts to that default. Low-level port omission still writes no methods.
  • Consumers without family readback do not enforce family-only changes on existing profiles. They can supply GsmProfile.ipFamily as appliedIpFamily to enable known-mismatch reconciliation. Unknown readback does not prove the family was applied.
  • Only the three method pairs above yield a family. auto/ignore, manual settings, and disabled/disabled stay unknown.
  • Receipt reasons include a family suffix. Consumers should use receipt status rather than parse the reason text.
  • ipv6.method disabled requires NetworkManager 1.20 or newer. Dual stack requests both automatic methods without requiring both to succeed.
  • Saved settings do not prove carrier-granted addresses. APN ownership, credentials, routes, DNS, may-fail, activation policy and ModemManager bearer operations are unchanged. FM350-GL support is retained.

Rollback: revert the profile-family changes.


Checklist

  • Docs updated if behavior or structure changed (Rule A: AGENTS.md within budget, README, docs/, versions.yaml)
  • User docs (Rule G): no user-visible change in CeraUI
  • Started from updated main; canonical main remains the branch base (Rule B)
  • Rule D local-scratch reference check passes for tracked changes
  • Tests pass; QA evidence included above

@pjeweb

pjeweb commented Nov 14, 2026

Copy link
Copy Markdown
Author

Opened upstream as CERALIVE#33. The branch is kept.

@pjeweb pjeweb closed this Nov 14, 2026
@pjeweb pjeweb added the upstream: open An upstream pull request exists; see the linked comment for its current state. label Nov 16, 2026
@pjeweb

pjeweb commented Nov 16, 2026

Copy link
Copy Markdown
Author

I noticed this fork PR has upstream history: CERALIVE#33 (open). A closed or merged fork PR does not mean it was merged upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream: open An upstream pull request exists; see the linked comment for its current state.

Development

Successfully merging this pull request may close these issues.

1 participant